<HTML>
<BODY BGCOLOR="white">
<PRE>
<FONT color="green">001</FONT>    // Copyright 2006-07 Regents of the University of California.  May be used <a name="line.1"></a>
<FONT color="green">002</FONT>    // under the terms of the revised BSD license.  See LICENSING for details.<a name="line.2"></a>
<FONT color="green">003</FONT>    /** <a name="line.3"></a>
<FONT color="green">004</FONT>     * @author Adrian Mettler <a name="line.4"></a>
<FONT color="green">005</FONT>     */<a name="line.5"></a>
<FONT color="green">006</FONT>    package org.joe_e;<a name="line.6"></a>
<FONT color="green">007</FONT>    <a name="line.7"></a>
<FONT color="green">008</FONT>    /**<a name="line.8"></a>
<FONT color="green">009</FONT>     * Marker interface for annotating classes that are indistinguishable from<a name="line.9"></a>
<FONT color="green">010</FONT>     * a shallow copy of themselves.<a name="line.10"></a>
<FONT color="green">011</FONT>     * &lt;p&gt;<a name="line.11"></a>
<FONT color="green">012</FONT>     * Joe-E requires that classes that implement this interface must<a name="line.12"></a>
<FONT color="green">013</FONT>     * meet all of the following obligations:<a name="line.13"></a>
<FONT color="green">014</FONT>     * &lt;ol&gt;<a name="line.14"></a>
<FONT color="green">015</FONT>     * &lt;li&gt; All instance fields must be final.<a name="line.15"></a>
<FONT color="green">016</FONT>     * &lt;li&gt; The class cannot be equatable.<a name="line.16"></a>
<FONT color="green">017</FONT>     * &lt;li&gt; The object identity of instances of the class is not visible  This can<a name="line.17"></a>
<FONT color="green">018</FONT>     *   be satisfied by either of:<a name="line.18"></a>
<FONT color="green">019</FONT>     *   &lt;ol&gt;<a name="line.19"></a>
<FONT color="green">020</FONT>     *   &lt;li&gt; The superclass implements Selfless; or,<a name="line.20"></a>
<FONT color="green">021</FONT>     *   &lt;li&gt; The class's superclass is java.lang.Object, the class overrides<a name="line.21"></a>
<FONT color="green">022</FONT>     *        &lt;code&gt;equals()&lt;/code&gt;, and doesn't call &lt;code&gt;super.equals()&lt;/code&gt;. <a name="line.22"></a>
<FONT color="green">023</FONT>     *   &lt;/ol&gt;<a name="line.23"></a>
<FONT color="green">024</FONT>     * &lt;li&gt; The object provides a hash code that does not reveal object identity.<a name="line.24"></a>
<FONT color="green">025</FONT>     *   This requirement is enforced by including hashCode() in the interface.<a name="line.25"></a>
<FONT color="green">026</FONT>     * &lt;/ol&gt;<a name="line.26"></a>
<FONT color="green">027</FONT>     * &lt;p&gt;<a name="line.27"></a>
<FONT color="green">028</FONT>     * The Joe-E verifier ensures that Joe-E code cannot distinguish a<a name="line.28"></a>
<FONT color="green">029</FONT>     * shallow copy of a Selfless object from the original object.<a name="line.29"></a>
<FONT color="green">030</FONT>     * <a name="line.30"></a>
<FONT color="green">031</FONT>     * @see Equatable<a name="line.31"></a>
<FONT color="green">032</FONT>     */<a name="line.32"></a>
<FONT color="green">033</FONT>    public interface Selfless {<a name="line.33"></a>
<FONT color="green">034</FONT>        int hashCode();<a name="line.34"></a>
<FONT color="green">035</FONT>        /*<a name="line.35"></a>
<FONT color="green">036</FONT>        boolean equals(Object obj);<a name="line.36"></a>
<FONT color="green">037</FONT>        */<a name="line.37"></a>
<FONT color="green">038</FONT>    }<a name="line.38"></a>




























































</PRE>
</BODY>
</HTML>
